package cn.azzhu.springdemo.controller;

import cn.azzhu.springdemo.service.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 演示SpringBoot异步调用技术
 */
@RestController
@Slf4j
public class MemberController {

  @Autowired
  private MemberService memberService;

  @RequestMapping("/addMemberAndEmail")
  public String addMemberAndEmail() {
    log.info("1");
    String result = memberService.addMemberAndEmail();
    log.info("4");
    return result;
  }
}
